Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide our own implementation of scrollCaretIntoView #2685

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

JiuqingSong
Copy link
Collaborator

Previously I added a feature in formatContentModel to allow scroll caret into view after write back with Content Model. It was using browser's scrollIntoView implementation which has some problem especially when caret is already visible. And we also need to handle the case when visible viewport is not the actual size of editor (getVisibleViewport() will give us the expected value). So in this change I created our own implementation of scrollCreateIntoView, and call it from existing format API

@JiuqingSong JiuqingSong merged commit a9dd82c into master Jun 6, 2024
7 checks passed
@JiuqingSong JiuqingSong deleted the u/jisong/scrollintoview branch June 6, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants